
/**		
 * 
 *	uk.co.lmfm.guppy.controller.StartupCommand
 *	
 *	@version 1.00 | Jan 7, 2010
 *	@author Justin Windle
 *  
 **/
 
package uk.co.lmfm.guppy.controller 
{
	import uk.co.lmfm.guppy.model.AdobeOSProxy;
	import uk.co.lmfm.guppy.model.LibraryProxy;
	import uk.co.lmfm.guppy.application.enum.ApplicationConstants;
	import uk.co.lmfm.guppy.model.EclipseProxy;
	import uk.co.lmfm.guppy.model.WorkspaceProxy;
	import uk.co.lmfm.guppy.model.SettingsProxy;
	import uk.co.lmfm.guppy.model.SVNProxy;
	import uk.co.lmfm.guppy.model.vo.StartupVO;
	import uk.co.lmfm.guppy.view.ApplicationMediator;

	import org.puremvc.as3.multicore.interfaces.ICommand;
	import org.puremvc.as3.multicore.interfaces.INotification;
	import org.puremvc.as3.multicore.patterns.command.SimpleCommand;

	/**
	 * StartupCommand
	 */
	public class StartupCommand extends SimpleCommand implements ICommand 
	{
		override public function execute(notification : INotification) : void
		{
			super.execute(notification);
			
			var vo : StartupVO = notification.getBody() as StartupVO;
			
			var workspaceProxy : WorkspaceProxy = new WorkspaceProxy();
			var libraryProxy : LibraryProxy = new LibraryProxy();
			var fdtProxy : EclipseProxy = new EclipseProxy();
			var configProxy : SettingsProxy = new SettingsProxy();
			var svnGuppyProxy : SVNProxy = new SVNProxy();			var svnAdobeProxy : AdobeOSProxy = new AdobeOSProxy();
			
			facade.registerProxy(workspaceProxy);			facade.registerProxy(libraryProxy);			facade.registerProxy(configProxy);
			facade.registerProxy(svnGuppyProxy);			facade.registerProxy(svnAdobeProxy);			facade.registerProxy(fdtProxy);
			
			facade.registerMediator(new ApplicationMediator(vo.container));
			
			sendNotification(ApplicationConstants.INITIALISE);
		}
	}
}
